#ifndef __FUNC_ADAPTER_H
#define __FUNC_ADAPTER_H


void func_adapter(void);
void func_adapter_init(void);
void wireless_mic_rec_conn_process(void);

///extern api
void func_adapter_message(u16 msg);

typedef void (*audio_callback_t)(u8 *ptr, u32 samples, int ch_mode, void *param);
///外部adpcm api
void adpcm_dec_mic_output_callback_set(audio_callback_t callback);
void adpcm_dec_mic_init(u8 sample_rate, u16 samples);

///外部plc adpcm api
void plc_adpcm_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void plc_adpcm_audio_output_callback_set(audio_callback_t callback);
void plc_adpcm_init(u8 sample_rate, u16 samples);

///外部sbc dec mic api
void sbc_dec_mic_audio_output_callback_set(audio_callback_t callback);
void sbc_dec_init(u8 sample_rate, u16 samples);

void opus_dec_mic_init(u8 sample_rate, u16 samples);
void opus_dec_mic_audio_output_callback_set(audio_callback_t callback);

///外部plc sbc mic api
void plc_sbc_mic_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void plc_sbc_mic_audio_output_callback_set(audio_callback_t callback);
void plc_sbc_mic_init(u8 sample_rate, u16 samples);

///外部sndp api
void sndp_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void sndp_audio_output_callback_set(audio_callback_t callback);
void sndp_init(u8 sample_rate, u16 samples);

///外部dnn api
void dnn_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void dnn_audio_output_callback_set(audio_callback_t callback);
void dnn_audio_init(u8 sample_rate, u16 samples);

///外部src api
void src_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void src_audio_output_callback_set(audio_callback_t callback);
void src_init(u8 sample_rate, u16 samples);
void src_buf_init(u8 sample_rate, u16 samples);
void src_buf_audio_output_callback_set(audio_callback_t callback);
void src_buf_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void src_buf_kick(uint samples, uint ch_mode, audio_callback_t handle);

///外部dac out api
void dac_out_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void dac_out_audio_output_callback_set(audio_callback_t callback);
void dac_out_init(u8 sample_rate, u16 samples);
void dac_out_fast_init(u8 sample_rate, u16 samples);
void dac_out_audio_mute_set(uint8_t mute);

///外部dac1 out api
void dac1_out_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void dac1_out_audio_output_callback_set(audio_callback_t callback);
void dac1_out_init(u8 sample_rate, u16 samples);


///外部usb mic in api
void usb_mic_in_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void usb_mic_in_audio_output_callback_set(audio_callback_t callback);
void usb_mic_in_init(u8 sample_rate, u16 samples);

///外部usb audio out api
void usb_audio_out_audio_output_callback_set(audio_callback_t callback);
void usb_audio_out_init(u8 sample_rate, u16 samples);

void aux_audio_output_callback_set(audio_callback_t callback);
void aux_audio_out_init(u8 sample_rate, u16 samples);

///外部mic和蓝牙数据混合api
void rec_data_blending_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void rec_data_blending_output_callback_set(audio_callback_t callback);
void rec_data_blending_init(u8 sample_rate, u16 samples);

void plc_api_init(u8 sample_rate, u16 samples);
void plc_api_audio_output_callback_set(audio_callback_t callback);

void plc_soft_api_init(u8 sample_rate, u16 samples);
void plc_soft_api_audio_output_callback_set(audio_callback_t callback);

void nr_far_mic_init(u8 sample_rate, u16 samples);
void nr_far_mic_output_callback_set(audio_callback_t callback);
void nr_far_mic_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void nr_far_mic_param_set(u16 noise_thr, u16 nr_level);

void ains3_mic_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void ains3_mic_output_callback_set(audio_callback_t callback);
void ains3_mic_init(u8 sample_rate, u16 samples);
void ains3_mic_mute_set(uint8_t mute);
uint8_t ains3_mic_mute_get(void);

void iis_tx_pool_init(u8 sample_rate, u16 samples);
void iis_tx_audio_output_callback_set(audio_callback_t callback);
void iis_tx_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);

void usb_mic_in_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void usb_mic_in_audio_output_callback_set(audio_callback_t callback);
void usb_mic_in_init(u8 sample_rate, u16 samples);
#endif
